/**
 * 
 */
package com.zhanggz.mypattern.cor.handler;

/**
 * PriceHandler工厂类
 * 
 * @author Alex
 * @date 2015年6月23日
 */
public class PriceHandlerFactory {

	/**
	 * 创建PriceHandler的工厂方法
	 * 
	 * @return
	 */
	public static PriceHandler createPriceHandler() {
		PriceHandler sales = new Sales();
		PriceHandler manager = new manager();
		PriceHandler director = new Director();
		PriceHandler vp = new VicePresident();
		PriceHandler ceo = new CEO();
		sales.setSuccessor(manager);
		manager.setSuccessor(director);
		director.setSuccessor(vp);
		vp.setSuccessor(ceo);

		return sales;
	}

}
